from django.shortcuts import render
from django.conf.urls import url, include
from django.contrib.auth.models import User
from rest_framework import routers, serializers, viewsets
from rest_framework import permissions
from ..models.Comprobante import Comprobante


class ComprobanteSerializer(serializers.ModelSerializer):

    class Meta:
        model = Comprobante
        #fields = ('url', 'codigo', 'nombre', 'ciclo')


class ComprobanteViewSet(viewsets.ModelViewSet):  # API REST
    queryset = Comprobante.objects.filter()
    serializer_class = ComprobanteSerializer
    #permission_classes = [permissions.IsAuthenticated]
